<?php
session_save_path('sessions');
session_start();
?>

<?php include("include/header.php"); ?>
<html>
<body>
  <div id="wrapper">
    <div id="header"> </div>
    <div id="left">
      <div id="logo">
        <h1>Home Sale</h1>
        <p>Only By Owner</p>
      </div>
      <div id="nav">
         <ul>
		 <?php 

		 if(isset($_SESSION['user']))
			{
				?>

				<li>
						<a href="addAhomeForSale.php">Add a House for sale</a>
					</li>
					<li>
						<a href="updateAhome.php">Update House information</a>
					</li>
					<li >
						<a href="updateAhomePicture.php">Update House picture</a>
					<li class="important">
						<a href="searchhouse.php">Search House</a></li>
					<li>
						<a href="emailMenu.php">Mailbox</a>
					</li>
					<li>
						<a href="logout.php">Logout</a>
				</li>
			<?php
				}
				else{
				?>
					  <li ><a href="index.php">Home</a></li>
					  <li><a href="main_login.php">Login</a></li>
					  <li><a href="register.php">Register</a></li>
					  <li class="important"><a href="searchhouse.php">Search House</a></li>
					  <li><a href="logout.php">Logout</a></li>

				<?php
						}
					?>
        </ul>
      </div>
      <div id="news">
        <?php include("adgeneratorleft1.php");?>
        <div class="hr-dots"> </div>
        <?php include("adgeneratorleft2.php");?>
      </div>
      <div id="support">
      </div>
    </div>
    <div id="right">
      <h2>Search for Property </h2>
      <div id="welcome">
        <table>
          <form action="searchresult.php" method="post">
              <tr><td><b>City:</b></td><td><input type="text" name="city" /></td></tr>
              <tr><td><b>Postal Code:</b></td><td><input type="text" name="postalCode" /></td></tr>
              <tr><td><b>Neighbourhood:</b></td><td><input type="text" name="neighbourhood" /></td></tr>
			  <tr><td><b>Region:</b></td><td><input type="text" name="region" /></td></tr>
              <tr><td><b>Country:</b></td><td><input type="text" name="country" /></td></tr>
			  <tr><td><br></td></tr>
              <tr><td><b>Price:</b></td></tr>
              <tr>
                <td>
                  <select name="priceMin">
                    <option value="0">Min</option>
                    <option value="0">0$</option>
                    <option value="25000">25 000$</option>
                    <option value="50000">50 000$</option>
                    <option value="75000">75 000$</option>
                    <option value="100000">100 000$</option>
                    <option value="125000">125 000$</option>
                    <option value="150000">150 000$</option>
                    <option value="175000">175 000$</option>
                    <option value="200000">200 000$</option>
                    <option value="225000">225 000$</option>
                    <option value="250000">250 000$</option>
                    <option value="275000">275 000$</option>
                    <option value="300000">300 000$</option>
                    <option value="325000">325 000$</option>
                    <option value="350000">350 000$</option>
                    <option value="375000">375 000$</option>
                    <option value="400000">400 000$</option>
                    <option value="450000">450 000$</option>
                    <option value="500000">500 000$</option>
                    <option value="550000">550 000$</option>
                    <option value="600000">600 000$</option>
                    <option value="650000">650 000$</option>
                    <option value="700000">700 000$</option>
                    <option value="750000">750 000$</option>
                    <option value="800000">800 000$</option>
                    <option value="850000">850 000$</option>
                    <option value="900000">900 000$</option>
                    <option value="950000">950 000$</option>
                    <option value="1000000">1 000 000$ +</option>   
                  </select>
                </td>
                <td>
                <select name="priceMax">
                  <option value="100000000">Max</option>
                  <option value="50000">50 000$</option>
                  <option value="75000">75 000$</option>
                  <option value="100000">100 000$</option>
                  <option value="125000">125 000$</option>
                  <option value="150000">150 000$</option>
                  <option value="175000">175 000$</option>
                  <option value="200000">200 000$</option>
                  <option value="225000">225 000$</option>
                  <option value="250000">250 000$</option>
                  <option value="275000">275 000$</option>
                  <option value="300000">300 000$</option>
                  <option value="325000">325 000$</option>
                  <option value="350000">350 000$</option>
                  <option value="375000">375 000$</option>
                  <option value="400000">400 000$</option>
                  <option value="450000">450 000$</option>
                  <option value="500000">500 000$</option>
                  <option value="550000">550 000$</option>
                  <option value="600000">600 000$</option>
                  <option value="650000">650 000$</option>
                  <option value="700000">700 000$</option>
                  <option value="750000">750 000$</option>
                  <option value="800000">800 000$</option>
                  <option value="850000">850 000$</option>
                  <option value="900000">900 000$</option>
                  <option value="950000">950 000$</option>
                  <option value="100000000">1 000 000$ +</option>
                </select>
                </td>
              </tr>
			  <tr><td><br></td></tr>
            <tr>
              <td><b>Property Size:</b></td>
            </tr>
            <tr>
              <td>
                <select name="sizeMin">
                  <option value="0">Min</option>
                  <option value="0">0</option>
                  <option value="250">250</option>
                  <option value="500">500</option>
                  <option value="750">750</option>
                  <option value="1000">1 000</option>
                  <option value="1500">1 500</option>
                  <option value="1750">1 750</option>
                  <option value="2000">2 000</option>
                  <option value="25000">2 500</option>
                  <option value="5000">5 000</option>
                  <option value="10000">10 000</option>
                </select>
              </td>
              <td>
                <select name="sizeMax">
                  <option value="100000">Max</option>
                  <option value="250">250</option>
                  <option value="500">500</option>
                  <option value="750">750</option>
                  <option value="1000">1 000</option>
                  <option value="1500">1 500</option>
                  <option value="1750">1 750</option>
                  <option value="2000">2 000</option>
                  <option value="25000">2 500</option>
                  <option value="5000">5 000</option>
                  <option value="100000">10 000 +</option>
                </select>
              </td>
            </tr>
			<tr><td><br></td></tr>
            <tr>
            <td><b>Year Built:<b/></td>
            </tr>
            <tr>
              <td>
                <select name="yearMin">
                  <option value="0">From</option>
                  <option value="0">Before 1960</option>
                  <option value="1960">1960</option>
                  <option value="1965">1965</option>
                  <option value="1970">1970</option>
                  <option value="1975">1975</option>
                  <option value="1980">1980</option>
                  <option value="1985">1985</option>
                  <option value="1990">1990</option>
                  <option value="1995">1995</option>
                  <option value="2000">2000</option>
                </select>
              </td>
              <td>
                <select name="yearMax">
                  <option value="20000">To</option>
                  <option value="1960">1960</option>
                  <option value="1965">1965</option>
                  <option value="1970">1970</option>
                  <option value="1975">1975</option>
                  <option value="1980">1980</option>
                  <option value="1985">1985</option>
                  <option value="1990">1990</option>
                  <option value="1995">1995</option>
                  <option value="2000">2000</option>
                  <option value="2011">After 2000</option>
                </select>
              </td>
            </tr>
			<tr><td><br></td></tr>
            <tr><td><b>Select Property Type:</b></td></tr>
            <tr>
              <td><input type="checkbox" name="propertyType1" value="1" checked/> Condo</td>
              <td><input type="checkbox" name="propertyType2" value="2" checked/> Apartment</td>
            </tr>
            <tr>
              <td><input type="checkbox" name="propertyType3" value="3" checked/> Single Family</td>
              <td><input type="checkbox" name="propertyType4" value="4" checked/> Cottages</td>
            </tr>
			<tr><td><br></td></tr>
			<tr><td><b>Number of Rooms:</b></td><td><input type="text" name="roomnumber" /></td></tr>
			<tr><td><br></td></tr>
            <tr><td><b>Other Options:</b></td></tr>
           	<tr><td>Heating</td></tr>
			<tr><td><input type="radio" name="heating" value="1" checked /> Yes</td><td><input type="radio" name="heating" value="0" />No</td></tr>
			<tr><td>Cooling</td></tr>
			<tr><td><input type="radio" name="cooling" value="1" checked /> Yes</td><td><input type="radio" name="cooling" value="0" />No</td></tr>
			<tr><td>Parking</td</tr>
			<tr><td><input type="radio" name="parking" value="1" checked /> Yes</td><td><input type="radio" name="parking" value="0" />No</td></tr>
			<tr><td>Garage</td></tr>
			<tr><td><input type="radio" name="garage" value="1" checked /> Yes</td><td><input type="radio" name="garage" value="0" />No</td></tr>
			<tr><td>Driveway</td></tr>
			<tr><td><input type="radio" name="driveway" value="1" checked /> Yes</td><td><input type="radio" name="driveway" value="0" />No</td></tr>
            </tr>
			<tr><td><br></td></tr>
			<tr><td><b>Other features:</b></td><td><input type="text" name="other" /></td></tr>
			<tr><td><br></td></tr>
			<tr>
			<td>
			<input type="submit" value="Search" />
            <input type="reset" />
			</td>
			</tr>
        </form>
        </table>
      </div>
      <h3></h3>
      <div id="profile">
        <div id="corp">
          <?php include("adgeneratorbottomleft.php");?>
        </div>
        <div id="indu">
          <?php include("adgeneratorbottomright.php");?>
        </div>
      </div>
    </div>
    <div class="clear"> </div>
    <div id="spacer"> </div>
    <div id="footer">
      <div id="copyright">
        &copy; Template taken from http://www.freewebsitetemplates.com/
      </div>
	  <div id="footerline"></div>
    </div>
	
  </div>
</body>
</html>
